﻿'Params
'lat (Optional) : Specifies a latitude value to retrieve events for (service returns nearby events by default)
'location (Optional) : Specifies a location to retrieve events for (service returns nearby events by default)
'long (Optional) : Specifies a longitude value to retrieve events for (service returns nearby events by default)
'distance (Optional) : Find events within a specified radius (in kilometres)
'limit (Optional) : The number of results to fetch per page. Defaults to 10.
'page (Optional) : The page number to fetch. Defaults to first page.
'api_key (Required) : A Last.fm API key.
'Auth
'This service does not require authentication. 

Public Class GeoGetEvents
	Inherits BaseRequest
    Dim lat As String = ""
    Dim location As String = ""
    Dim long_ As String = ""
    Dim distance As String = ""
    Dim limit As String = ""
    Dim page As String = ""

    Public xmlresponse As XDocument = Nothing

    Public Sub New(lat As String, location As String, long_ As String, distance As String, limit As String, page As String)
        Me.lat = lat
        Me.location = location
        Me.long_ = long_
        Me.distance = distance
        Me.limit = limit
        Me.page = page
    End Sub

    Public Sub sendRequest()
        InitializeMembers("geo.getEvents")

        AddMember("lat", lat, False)
        AddMember("location", location, False)
        AddMember("long_", long_, False)
        AddMember("distance", distance, False)
        AddMember("limit", limit, False)
        AddMember("page", page, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
    End Sub

    '	Public Function getResponse() As AlbumGetInfoResponse
    '	Dim response As New AlbumGetInfoResponse
    '		response.album = New Album(xmlresponse.<lfm>.<album>.First)
    '		Return response
    '	End Function
End Class
